package com.soft.service;

import java.util.List;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.util.Assert;
import com.soft.entity.Location;

@SpringBootTest
public class LocationServiceTest {
	@Autowired
	private LocationService locationService;
	@Test
	public void queryByDeptNameTest() {
		List<Location> locationList = locationService.queryByDeptLoc("贵州");
		Assert.isTrue(locationList.size()==1, "查询错误");
	}
	//@Test
	public void insertLocationTest() {
		int num = locationService.insertLocation("195988","中国","1");
		Assert.isTrue(num==1, "增加地址错误");
	}
	//@Test
	public void updateLocatinTest() {
		//将10086的国家修改为
		int num = locationService.updateLocation("10086","韩国","1");
		Assert.isTrue(num==1,"修改国家错误");
	}
	
}
